package com.zcrain.aspectjdemo;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {
    private static final String TAG = "MainActivity";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.btn_jump).setOnClickListener(v -> {
            startActivity(new Intent(this, SecondActivity.class));
        });

        findViewById(R.id.btn_2).setOnClickListener(v -> {
            testEvent();
        });
    }

    @Override
    protected void onStart() {
        super.onStart();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }


    @TrackEvent(eventName = "testEvent", eventId = "01")
    public void testEvent() {
        Log.d(TAG, "testEvent");
    }
}